home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / prog / hlpdk50.zip / HELPC.DOC < prev    next >
Text File  |  1993-05-28  |  17KB  |  405 lines

  1.  
  2.  ╔══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                          ║
  4.  ║                                 ISoft D&M                                ║
  5.  ║                                 POB. 5517                                ║
  6.  ║                           Coralville IA 52241                            ║
  7.  ║                                   U.S.A                                  ║
  8.  ║                                                                          ║
  9.  ╚══════════════════════════════════════════════════════════════════════════╝ 
  10.  
  11. *******************************************************************************
  12. * HELPC Help Engine Technical specification and compiler user guide           *
  13. * LAST UPDATE - May. 23, 1993. (c) 1992,93 - Loewy Ron.                       *
  14. *******************************************************************************
  15.  
  16. *******************************************************************************
  17. *                              General Overview                               *
  18. *******************************************************************************
  19.  
  20.   The Help Engine database is a combination of text that is read by the user,
  21.  and a Topic and Links database that allows the user to view the topics
  22.  he is interested in, using hyper-text methods.
  23.  
  24.  
  25.   Each help database is built of 4 file components : 
  26.  
  27.  1. Help Data File    - this file contains the raw text data.
  28.  2. Topic Index File  - a database table that contains the topic names, and
  29.                         the references to the topics in the Data File.
  30.  3. Links Index File  - a database table that contains the list of links 
  31.                         defined for each topic, and positional data.
  32.  4. Set Data File     - a database configuration file that contains the
  33.                         names of the 3 components defined above, and some 
  34.                         additional information.
  35.  
  36.   Version 1.x is the bare-bones version that includes only the basic
  37.  operations needed from a hyper-text database, this version is implemented
  38.  using the Paradox Engine V3.0 to manage the Topic and Link index tables.
  39.  
  40.   Version 2.x has a new field in the topic table - the title field, help
  41.  databases that were compiled with V1.x will not be executed by version
  42.  2.x, they will have to be re-compiled!.
  43.  
  44.   Version 3.x fields have different length - the databases have to be 
  45.  re-compiled.
  46.  
  47.   Version 5.0+ has a new entry in the help set file, database have to be
  48.  re-compiled, ot the value 128 should be added in the last line of the help
  49.  set file, and the version number should be changed to 5.0.
  50.  
  51.   The format of the help database is released to the public domain, if
  52.  you implement a database viewer on this database structure, I would be
  53.  happy to receive a copy ..
  54.  
  55. *******************************************************************************
  56. *                               Compiler Usage                                *
  57. *******************************************************************************
  58.  
  59.   The HELPC help compiler is a dos command line program that receives a 
  60.  help definition file (.HDF) and produce a help database. 
  61.  
  62.   The helpC command line is :
  63.  
  64.  HELPC source.fil [/Htopic-table-name] [/Llink-table-name] [/Ddata-file-name] 
  65.                   [/R-]  [/ST-] [/CS+] [/EP+]
  66.                   [/W+]  [/W30] [/W31] [TH+] [/QH+] [/TV+] [/PH+] [/XD+]
  67.                   [/PX+] [/MT+]
  68.  
  69.   The output of the compiler is a set data file called source.SET, that
  70.  includes the names of the other help database components. 
  71.  
  72.   Please Notice - if the /W+ /W30 or /W31 switch is defined, the compiler 
  73.  will generate a .HPJ and .RTF files that can be used with the Microsoft 
  74.  HC (v3.00b) or HC31 help compiler, and output a .HLP windows help file!. 
  75.  
  76.   By default the help compiler produces a help cross reference report on the 
  77.  topics/links used in the database, if the /R- switch is set, no cross-ref
  78.  report will be generated, and no database integrity indicators will be
  79.  given.
  80.  
  81.  
  82.   IMPORTANT - Scan the output cross reference report for links defined, that
  83.  are not defined as topics!
  84.  
  85.   Notice - An additional switch is available that instructs the help compiler
  86.  to indicate it's parse and code generation progress. Use the /EP+ switch to
  87.  see that the helpC compiler is active. Please understand that the compile
  88.  process can take a long time, on complex help databases. This switch does
  89.  nothing more that ensure to you that the help compiler is alive. 
  90.  
  91.   The /ST switch defines if the topic name defined in the .TOPIC command
  92.  can include embeded spaces. By default this switch is set to /ST- (No
  93.  embedded spaces).
  94.  
  95.   The /CS switch turns Topics and Links case sensativity to ON. Use this
  96.  switch with care - Only if you must have a lower/mixed case index in THELP
  97.  or POPHELP use this switch. Notice that help databases that compile fine
  98.  with case sensativity set to off, might fail to do so in case sensativity
  99.  on. By deafult this switch is set to off (-).
  100.  
  101.   The /XD switch generates code to the MDVXHELP help compiler, available
  102.  free in the file DVXHLP10.ZIP on the internet. When this switch is given,
  103.  a set of cover and section files is generated, as well as a response
  104.  file that should be used to compile the help database.
  105.  
  106. *******************************************************************************
  107. *                                Command Line                                 *
  108. *******************************************************************************
  109.  
  110.   The compiler switches are defined on the command line. These switches can
  111.  be placed before and after the source file name. The compiler will look for
  112.  a file named HELPC.CFG in the current directory, and process it before any
  113.  command line switches are processed. 
  114.  
  115.   Switches on the command line will over-ride switches set before them, on the
  116.  command line or in one of the response options file.
  117.  
  118.   Response option files can be specified by prefixing their name with a @ sign.
  119.  
  120.  Examples :
  121.  
  122.  If our HELPC.CFG file, in the current directory is :
  123.  
  124. /W31
  125. /R-
  126.  
  127.  And we compile using HELPC HELPDEMO
  128.  
  129.  The helpdemo.hdf file will be compiled, with the target set to winhelp 3.1
  130.  and no cross-reference report.
  131.  
  132.  Compile using HELPC HELPDEMO /r+
  133.  
  134.  Will create winhelp 3.1 sources, but a report will be generated.
  135.  
  136.  Compile using HELPC /w- HELPDEMO
  137.  
  138.  Will generate native format help database, no report is generated.
  139.  
  140.  If we have a file called MYSWITCH.CFG with the following lines :
  141.  
  142. /TH+
  143. /ST-
  144. /CS+
  145.  
  146.  And we compile using HELPC @MYSWITCH.CFG HELPDEMO
  147.  
  148.  A THELP source, using Long Topic Names, with case sensativity will be 
  149.  generated, no cross reference report is generated. (HELPC.CFG contains /r-)
  150.  
  151. *******************************************************************************
  152. *                           Help Definition Format                            *
  153. *******************************************************************************
  154.  
  155.   The help definition file format is as follows :
  156.  
  157. remarks ...
  158. remarks ...
  159.  
  160. .ENTRY topic-name
  161. [.TITLE optional title for topic]
  162. topic text and link reference .. 
  163. topic text and link reference .. 
  164. topic text and link reference .. 
  165. topic text and link reference .. 
  166. .END-ENTRY 
  167.  
  168. remarks ...
  169.  
  170.  
  171. .ENTRY topic2-name
  172. [.PARAGRAPH]
  173. topic 2 text and link reference .. 
  174. topic 2 text and link reference .. 
  175. topic 2 text and link reference .. 
  176. [.END-PARAGRAPH]
  177. additional topic2 text ...
  178. .END-ENTRY 
  179.  
  180.  
  181.   As can be seen - lines between the .ENTRY and .END-ENTRY keywords are
  182.  the lines processed by the help compiler, to create the help database, 
  183.  every other line is considered a remark, and is not parsed or evaluated by
  184.  the help compiler.
  185.  
  186.   The topic text and link reference lines are simple text lines, with
  187.  special link marks.
  188.  
  189.   A sample will provide the details :
  190.  
  191. This is a text help line that includes one ~link~link-topic-name~ in it.
  192.  
  193.   This line will be displayed in the help engine program as :
  194.  
  195. This is a text help line that includes one link in it.
  196.  
  197.   The word "link" will be in a different color then the rest of the line, 
  198.  to indicate that this is a link. If the user hi-lights the link, and
  199.  presses Enter (or points the mouse cursor and clicks), the help engine will
  200.  look for a topic called "link-topic-name", and display it.
  201.  
  202.   Browse the HELPDEMO.HDF file for a demo of a help database definition file.
  203.  
  204.  Notes :
  205.  
  206.  1. The keywords .TOPIC and .END-TOPIC can be used instead of .ENTRY and
  207.     .END-ENTRY respectivly.
  208.  
  209.     An equivelent pair of keywords are .TOP and .ENDTOP .
  210.  
  211.  2. Keywords are NOT case sensitive. (.topic = .TOPIC = .eNTry)
  212.  
  213.  3. The .TITLE keyword is optional. If no title is defined, the topic name
  214.     is used as a title. (just like in v1.x). 
  215.  
  216.  4. If you want the ~ sign to appear in your help database, use ~~ in your
  217.     help source file. (e.g. "This is a ~~" will be "This is a ~" in the final
  218.     help database.).
  219.  
  220.  5. The Optional .PARAGRAPH and .END-PARAGRAPH commands in the help topic text,
  221.     specify the start and the end of a paragraph. This feature is currently 
  222.     supported only for winhelp sources. This feature is important if you 
  223.     want to create long paragraphs that will wrap correctly when a user resizes
  224.     the help window. It is advized ALWAYS to use this feature for paragraphs,
  225.     future versions of the Help Development Kit will allow greater formatting
  226.     control over paragraphs using this mechanism.
  227.  
  228.     The .PAR and .ENDPAR keywords can be used instead of the .PARAGRAPH and
  229.     .END-PARAGRAPH keywords.
  230.  
  231.  6. When a .PARAGRAPH is issued, a .END-PARAGRAPH MUST be specified at the
  232.     end of the paragraph. These commands must appear as the first words in
  233.     a line. The text after the .PARAGRAPH command is NOT part of the text 
  234.     of the help topic.
  235.  
  236. Additional commands include :
  237.  
  238. .TEXTCOLOR, .LINKCOLOR and .LINKHIGH - VGA colors of text and links in normal 
  239. and high (selected) states in the native help format.
  240.  
  241. The syntax of these commands is :
  242.  
  243. .TEXTCOLOR w 
  244.  
  245. or 
  246.  
  247. .LINKCOLOR x
  248.  
  249. or
  250.  
  251. .LINKHIGH y
  252.  
  253. Where w, x and y are the color of the text/link, which is a combination of the 
  254. color of the foreground with the color of the background multiplied by 16.
  255.  
  256. The colors that can be used for both fore and background are :
  257.  
  258.   Black     = 0
  259.   Blue      = 1
  260.   Green     = 2
  261.   Cyan      = 3
  262.   Red       = 4
  263.   Magenta   = 5
  264.   Brown     = 6
  265.   LightGray = 7
  266.  
  267. The colors that can be used only for the foreground are :
  268.  
  269.   DarkGray     = 8
  270.   LightBlue    = 9
  271.   LightGreen   = 10
  272.   LightCyan    = 11
  273.   LightRed     = 12
  274.   LightMagenta = 13
  275.   Yellow       = 14
  276.   White        = 15
  277.  
  278. For example : to set the normal color of a link to light green on blue, use
  279.  
  280. .LINKCOLOR 26
  281.  
  282. where 26 = 10 + 16 * 1. (10 = light green, 1 = blue).
  283.  
  284. Creating Multiple Source Projects :
  285.  
  286. Use the .INCLUDE commands in the source of your .HDF file, to include an
  287. additional source file.
  288.  
  289. For Example :
  290.  
  291.  .. some stuff 
  292.  
  293. .include 2ndfile.hdf
  294.  
  295.  .. additional stuff
  296.  
  297. will process 2NDFILE.HDF in the middle of our source file.
  298.  
  299. Please notice - .INCLUDE commands can be nested in your source file,
  300. it is however not recommended to nest them too deep, helpC does not
  301. close the input file when a .INCLUDEd file is processed, in order to
  302. minimize help generation time - there is however, a limit on the number
  303. of open files that can be used by a program - this is a limit set by dos.
  304.  
  305. GUI Font based targets :
  306.  
  307. The .FIXEDFONT command is used to define a non proportional font as the 
  308. default font of the help database. Currently the only targets affected
  309. by this command are windows winHelp v3.x. If you find that your help 
  310. databases are not aligned after they are converted to winHelp format, use 
  311. this command and re-compile. This command has no effect on targets that are 
  312. different from the targets mentioned before.
  313.  
  314. The .PCFONT command is used to define a font that has the standard pc 
  315. character set (Terminal - in windows). If you convert a text based 
  316. database that uses the PC's special characters, use this command to
  317. set the default font. This command has no effect on targets that are 
  318. different from the targets mentioned before.
  319.  
  320.  
  321. *******************************************************************************
  322. *                             Topic Index Format                              *
  323. *******************************************************************************
  324.  
  325.   The topic index table format is as follows :
  326.  
  327.   TOPIC     - 40 charcters string key - this is the topic "name".
  328.   FILENAME  - 38 characters string field - includes the name of the
  329.               help raw data file. (Notice - V1.0 ignores the value of this 
  330.               field, it is here for future expansion).
  331.   START     - longint (long) field that contains the offset from the data file
  332.               start, to the start of the topics text data, in bytes.
  333.   LEN       - integer (int) field that contains the length (in bytes) of the 
  334.               text data of the topic.
  335.   TITLE     - 50 characters string key - the title of the topic.
  336.  
  337. *******************************************************************************
  338. *                             Links Index Format                              *
  339. *******************************************************************************
  340.  
  341.   The links index table format is as follows :
  342.  
  343.   TOPIC     - 40 characters string key - the name of the topic that 
  344.               has the link.
  345.   SEQ       - integer (int) key - contains the sequential number of 
  346.               the link in the topic. (This way you can assign the links
  347.               order in the topic).
  348.   LINK      - 40 characters string key - the name of the link topic to
  349.               display if the link is chosen.
  350.   LINE      - integer (int) field - the line (from the start of the topic) 
  351.               this link is displayed on.
  352.   COL       - integer (int) field - the column this link is displayed on.
  353.   TXT       - 60 characters string field - the text to display on the line.
  354.  
  355. *******************************************************************************
  356. *                               Set-File-Format                               *
  357. *******************************************************************************
  358.  
  359.   The set file is a text file that contains one entry in each line, using
  360.  the following format :
  361.  
  362. topic-index-table name
  363. links-index-table name
  364. help-raw-data-file name
  365. number-of-topics
  366. length-of-file
  367. version-of-generating-compiler
  368. link-normal-color
  369. link-high-color
  370. text-normal-color
  371. help-database-engine
  372.  
  373. The help-database-engine values available today are DEF=Paradox and 
  374. MEM=memory Tables.
  375.  
  376. *******************************************************************************
  377. *                               Implementation                                *
  378. *******************************************************************************
  379.  
  380.   Notice - The Paradox tables (Topic, Links) include one additional field
  381.  (wtGeneration) for future expansion purpose only.
  382.  
  383. *******************************************************************************
  384. *                                Distribution                                 *
  385. *******************************************************************************
  386.  
  387.   To distribute a database of your creation, compile the help definition
  388.  file, and include the HELPENG.EXE file with the .DB, .PX files, and the
  389.  .HDT file created by the compiler. 
  390.  
  391.   If you use the Native Mem Format, compile using the /MT+ switch, and
  392.  distribute HE.EXE with the .SET, .HDT and .HDX files created.
  393.  
  394.   If you generated the Windows (/W30, /W31) help file, you can complile the 
  395.  .HPJ and .RTF generated file, and distribute the resulting .HLP .
  396.  
  397.   If you generate QH, THELP, POPHELP or TVHC use these packages compilers to
  398.  compile you sources into native binary codes. (helpMake, HL, makeHelp and TVHC)
  399.  
  400.   To Generate Help databases for DESQview/X, use the MDVXHELP compiler
  401.  that can be found on the internet in the file DVXHLP10.ZIP.
  402.  
  403.   For examples on these compiler's command lines please refer to the quick
  404.  start section of HLPDK.DOC, or to your compiler's documentation.
  405.